<!DOCTYPE html>
<html lang=zh>
<head>
  <meta charset="utf-8">
  
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-transform" />
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="format-detection" content="telephone=no,email=no,adress=no">
  <!-- Color theme for statusbar -->
  <meta name="theme-color" content="#000000" />
  <!-- 强制页面在当前窗口以独立页面显示,防止别人在框架里调用页面 -->
  <meta http-equiv="window-target" content="_top" />
  <!-- 谷歌收录 -->
  <meta name="google-site-verification" content="-5hl8eC4wfapGZhZouwMVUcKG0iaynijVRJbqVlzXm4" />
  
  
  <title>让你的Windows更具生产力 | 鴻塵</title>
  <meta name="description" content="摘要：通过修改注册表的方式提升Windows使用体验、提高工作效率！">
<meta property="og:type" content="article">
<meta property="og:title" content="让你的Windows更具生产力">
<meta property="og:url" content="https://hwame.top/20210904/make-your-windows-productive.html">
<meta property="og:site_name" content="鴻塵">
<meta property="og:description" content="摘要：通过修改注册表的方式提升Windows使用体验、提高工作效率！">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/hwame/pics@main/miscellanea/20210905Notepad2.png">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/hwame/pics@main/miscellanea/20210905编辑注册表项值.png">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/hwame/pics@main/miscellanea/20210905修改数值数据.png">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/hwame/pics@main/miscellanea/20210905创建notepad项.png">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/hwame/pics@main/miscellanea/20210905创建command子项.png">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/hwame/pics@main/miscellanea/20210905右键打开CMD.png">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/hwame/pics@main/miscellanea/20210906右键复制路径.png">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/hwame/pics@main/miscellanea/20210906修改图片文件关联.png">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/hwame/pics@main/miscellanea/20210906选择图片默认打开方式.png">
<meta property="article:published_time" content="2021-09-04T15:45:56.000Z">
<meta property="article:modified_time" content="2021-09-06T15:26:09.000Z">
<meta property="article:author" content="鴻塵">
<meta property="article:tag" content="miscellanea">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://cdn.jsdelivr.net/gh/hwame/pics@main/miscellanea/20210905Notepad2.png">
  <!-- Canonical links -->
  <link rel="canonical" href="https://hwame.top/20210904/make-your-windows-productive.html">
  
    <link rel="alternate" href="true" title="鴻塵" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png" type="image/x-icon">
  
  
<link rel="stylesheet" href="/css/style.css">

  
  
  
    <link href="//cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css" rel="stylesheet">
  
  
<meta name="generator" content="Hexo 5.4.2"></head>


<script src="https://cdn.jsdelivr.net/gh/bobcn/hexo_resize_image.js@master/hexo_resize_image.js"></script>
<body class="main-center theme-purple" itemscope itemtype="http://schema.org/WebPage">
  <header class="header" itemscope itemtype="http://schema.org/WPHeader">
  <div class="slimContent">
    <div class="navbar-header">
      
      
      <div class="profile-block text-center">
        <a id="avatar" href="https://hwame.top" target="_blank">
          <img class="img-circle img-rotate" src="https://cdn.jsdelivr.net/gh/hwame/pics@main/avatar.jpg" width="200" height="200">
        </a>
        <h2 id="name" class="hidden-xs hidden-sm">鴻塵</h2>
        <h3 id="title" class="hidden-xs hidden-sm hidden-md">Pythoner, Data Analyst</h3>
        <small id="location" class="text-muted hidden-xs hidden-sm"><i class="icon icon-map-marker"></i> 湖北-武汉</small>
      </div>
      
      <div class="search" id="search-form-wrap">

    <form class="search-form sidebar-form">
        <div class="input-group">
            <input type="text" class="search-form-input form-control" placeholder="搜索" />
            <span class="input-group-btn">
                <button type="submit" class="search-form-submit btn btn-flat" onclick="return false;"><i class="icon icon-search"></i></button>
            </span>
        </div>
    </form>
    <div class="ins-search">
  <div class="ins-search-mask"></div>
  <div class="ins-search-container">
    <div class="ins-input-wrapper">
      <input type="text" class="ins-search-input" placeholder="想要查找什么..." x-webkit-speech />
      <button type="button" class="close ins-close ins-selectable" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
    </div>
    <div class="ins-section-wrapper">
      <div class="ins-section-container"></div>
    </div>
  </div>
</div>


</div>
      <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target="#main-navbar" aria-controls="main-navbar" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
    </div>
    <nav id="main-navbar" class="collapse navbar-collapse" itemscope itemtype="http://schema.org/SiteNavigationElement" role="navigation">
      <ul class="nav navbar-nav main-nav menu-highlight">
        
        
        <li class="menu-item menu-item-home">
          <a href="/.">
            
            <i class="icon icon-home-fill"></i>
            
            <span class="menu-title">首页</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-archives">
          <a href="/archives">
            
            <i class="icon icon-archives-fill"></i>
            
            <span class="menu-title">归档</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-categories">
          <a href="/categories">
            
            <i class="icon icon-folder-open"></i>
            
            <span class="menu-title">分类</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-tags">
          <a href="/tags">
            
            <i class="icon icon-tags"></i>
            
            <span class="menu-title">标签</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-repository">
          <a href="/repository">
            
            <i class="icon icon-project"></i>
            
            <span class="menu-title">资源</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-gallery">
          <a href="/gallery">
            
            <i class="icon icon-delicious"></i>
            
            <span class="menu-title">相册</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-links">
          <a href="/links">
            
            <i class="icon icon-friendship"></i>
            
            <span class="menu-title">友链</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-about">
          <a href="/about">
            
            <i class="icon icon-cup-fill"></i>
            
            <span class="menu-title">关于</span>
          </a>
        </li>
        
      </ul>
      
	
    <ul class="social-links">
    	
        <li><a href="https://github.com/hwame" target="_blank" title="Github" data-toggle=tooltip data-placement=top><i class="icon icon-github"></i></a></li>
        
        <li><a href="https://weibo.com/hwamei" target="_blank" title="Weibo" data-toggle=tooltip data-placement=top><i class="icon icon-weibo"></i></a></li>
        
        <li><a href="https://www.zhihu.com/people/hwame" target="_blank" title="Zhihu" data-toggle=tooltip data-placement=top><i class="icon icon-zhihu"></i></a></li>
        
        <li><a href="https://segmentfault.com/u/hwame" target="_blank" title="Segmentfault" data-toggle=tooltip data-placement=top><i class="icon icon-segmentfault"></i></a></li>
        
        <li><a href="https://gitee.com/hwame" target="_blank" title="Gitee" data-toggle=tooltip data-placement=top><i class="icon icon-gitee"></i></a></li>
        
        <li><a href="/atom.xml" target="_blank" title="Rss" data-toggle=tooltip data-placement=top><i class="icon icon-rss"></i></a></li>
        
    </ul>

    </nav>
  </div>
</header>

  
    <aside class="sidebar" itemscope itemtype="http://schema.org/WPSideBar">
  <div class="slimContent">
    
      <div class="widget">
    <h3 class="widget-title"><i style="color:#9400D3" class="icon icon-stackexchange"></i>公告</h3>
    <div class="widget-body">
        <div id="board">
            <div class="content">
                <p>欢迎来到鴻塵的博客!<br>鴻塵的<u><a target="_blank" rel="noopener" href="https://weibo.com/hwamei" style="color:#E541E5;">微博</a></u>主页，鴻塵的<u><a target="_blank" rel="noopener" href="https://github.com/hwame" style="color:#E541E5;">Github</a></u>主页，如果我可以忘记的<u><a target="_blank" rel="noopener" href="https://www.zhihu.com/people/hwame" style="color:#E541E5;">知乎</a></u>主页。</p>
            </div>
        </div>
    </div>
</div>

    
      
  <div class="widget">
    <h3 class="widget-title"><i style="color:#9400D3" class="icon icon-tags"></i>标签云</h3>
    <div class="widget-body tagcloud">
      <a href="/tags/CentOS/" style="font-size: 13px; color: #fff">CentOS</a> <a href="/tags/Go/" style="font-size: 13.2px; color: #fff">Go</a> <a href="/tags/Hexo/" style="font-size: 13.8px; color: #fff">Hexo</a> <a href="/tags/Linux/" style="font-size: 14px; color: #fff">Linux</a> <a href="/tags/Linux%E9%83%A8%E7%BD%B2/" style="font-size: 13px; color: #fff">Linux部署</a> <a href="/tags/MongoDB/" style="font-size: 13.4px; color: #fff">MongoDB</a> <a href="/tags/Spark/" style="font-size: 13px; color: #fff">Spark</a> <a href="/tags/matplotlib/" style="font-size: 13.2px; color: #fff">matplotlib</a> <a href="/tags/miscellanea/" style="font-size: 13.6px; color: #fff">miscellanea</a> <a href="/tags/python/" style="font-size: 14px; color: #fff">python</a> <a href="/tags/shell/" style="font-size: 13.6px; color: #fff">shell</a> <a href="/tags/%E5%A4%A7%E6%95%B0%E6%8D%AE/" style="font-size: 13px; color: #fff">大数据</a> <a href="/tags/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E7%AE%97%E6%B3%95/" style="font-size: 13px; color: #fff">数据结构与算法</a> <a href="/tags/%E7%88%AC%E8%99%AB/" style="font-size: 13px; color: #fff">爬虫</a>
    </div>
  </div>

<script type="text/javascript">
    var everytag=document.getElementsByClassName("widget-body tagcloud")[0].children;
    for (var i = everytag.length - 1; i >= 0; i--) {
    	var r=Math.floor(Math.random()*255);
        var g=Math.floor(Math.random()*255);
        var b=Math.floor(Math.random()*255);
        everytag[i].style.background = "rgb("+r+","+g+","+b+")";
    }
</script>
    
      
  <div class="widget">
    <h3 class="widget-title"><i style="color:#9400D3" class="icon icon-folder-open"></i>分类</h3>
    <div class="widget-body">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/Go/">Go</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Hexo/">Hexo</a><span class="category-list-count">5</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Linux/">Linux</a><span class="category-list-count">8</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/MongoDB/">MongoDB</a><span class="category-list-count">3</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/miscellanea/">miscellanea</a><span class="category-list-count">4</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/python/">python</a><span class="category-list-count">7</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E7%AE%97%E6%B3%95/">数据结构与算法</a><span class="category-list-count">1</span></li></ul>
    </div>
  </div>


    
      
  <div class="widget">
    <h3 class="widget-title"><i style="color:#9400D3" class="icon icon-archives-fill"></i>归档</h3>
    <div class="widget-body">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/">2022</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/">2021</a><span class="archive-list-count">9</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/">2020</a><span class="archive-list-count">17</span></li></ul>
    </div>
  </div>


    
      
  <div class="widget">
    <h3 class="widget-title"><i style="color:#9400D3" class="icon icon-shu-fill"></i>最新文章</h3>
    <div class="widget-body">
      <ul class="recent-post-list list-unstyled ">
        
          <li>
            
            <div class="item-thumb">
              <a href="/20220327/channel-and-goroutine-in-go.html" class="thumb">
    
    
        <span style="background-image:url(https://cdn.jsdelivr.net/gh/hwame/pics@main/post-pics/icon-golang.jpeg)" alt="Go语言中的通道" class="thumb-image"></span>
    
</a>

            </div>
            
            <div class="item-inner">
              <p class="item-category">
                <a class="category-link" href="/categories/Go/">Go</a>
              </p>
              <p class="item-title">
                <a href="/20220327/channel-and-goroutine-in-go.html" class="title">Go语言中的通道</a>
              </p>
              <p class="item-date">
                <time datetime="2022-03-27T11:06:16.000Z" itemprop="datePublished">2022-03-27</time>
              </p>
            </div>
          </li>
          
          <li>
            
            <div class="item-thumb">
              <a href="/20220323/when-to-use-pointer-in-go.html" class="thumb">
    
    
        <span style="background-image:url(https://cdn.jsdelivr.net/gh/hwame/pics@main/post-pics/icon-golang.jpeg)" alt="Go语言什么时候使用指针" class="thumb-image"></span>
    
</a>

            </div>
            
            <div class="item-inner">
              <p class="item-category">
                <a class="category-link" href="/categories/Go/">Go</a>
              </p>
              <p class="item-title">
                <a href="/20220323/when-to-use-pointer-in-go.html" class="title">Go语言什么时候使用指针</a>
              </p>
              <p class="item-date">
                <time datetime="2022-03-23T12:49:57.000Z" itemprop="datePublished">2022-03-23</time>
              </p>
            </div>
          </li>
          
          <li>
            
            <div class="item-thumb">
              <a href="/20220228/awesome-images-in-markdown.html" class="thumb">
    
    
        <span style="background-image:url(https://cdn.jsdelivr.net/gh/hwame/pics@main/avatar.jpg)" alt="Markdown中图片的高级用法" class="thumb-image"></span>
    
</a>

            </div>
            
            <div class="item-inner">
              <p class="item-category">
                <a class="category-link" href="/categories/miscellanea/">miscellanea</a>
              </p>
              <p class="item-title">
                <a href="/20220228/awesome-images-in-markdown.html" class="title">Markdown中图片的高级用法</a>
              </p>
              <p class="item-date">
                <time datetime="2022-02-28T15:27:50.000Z" itemprop="datePublished">2022-02-28</time>
              </p>
            </div>
          </li>
          
          <li>
            
            <div class="item-thumb">
              <a href="/20220116/shell-regular-expression.html" class="thumb">
    
    
        <span style="background-image:url(https://cdn.jsdelivr.net/gh/hwame/pics@main/post-pics/linux-icon.png)" alt="Shell正则表达式" class="thumb-image"></span>
    
</a>

            </div>
            
            <div class="item-inner">
              <p class="item-category">
                <a class="category-link" href="/categories/Linux/">Linux</a>
              </p>
              <p class="item-title">
                <a href="/20220116/shell-regular-expression.html" class="title">Shell正则表达式</a>
              </p>
              <p class="item-date">
                <time datetime="2022-01-16T14:13:05.000Z" itemprop="datePublished">2022-01-16</time>
              </p>
            </div>
          </li>
          
          <li>
            
            <div class="item-thumb">
              <a href="/20211009/install-linux-on-android-phone.html" class="thumb">
    
    
        <span style="background-image:url(https://cdn.jsdelivr.net/gh/hwame/pics@main/avatar.jpg)" alt="如何在安卓手机上安装Linux发行版" class="thumb-image"></span>
    
</a>

            </div>
            
            <div class="item-inner">
              <p class="item-category">
                <a class="category-link" href="/categories/miscellanea/">miscellanea</a>
              </p>
              <p class="item-title">
                <a href="/20211009/install-linux-on-android-phone.html" class="title">如何在安卓手机上安装Linux发行版</a>
              </p>
              <p class="item-date">
                <time datetime="2021-10-09T15:16:37.000Z" itemprop="datePublished">2021-10-09</time>
              </p>
            </div>
          </li>
          
      </ul>
    </div>
  </div>
  

    
  </div>
</aside>

  
  
<aside class="sidebar sidebar-toc collapse" id="collapseToc" itemscope itemtype="http://schema.org/WPSideBar">
  <div class="slimContent">
    <nav id="toc" class="article-toc">
      <h3 class="toc-title">文章目录</h3>
      <ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#1-%E6%9B%BF%E6%8D%A2%E7%B3%BB%E7%BB%9F%E8%AE%B0%E4%BA%8B%E6%9C%AC"><span class="toc-number">1.</span> <span class="toc-text">1.替换系统记事本</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#2-%E5%8F%B3%E9%94%AE%E7%94%A8%E8%AE%B0%E4%BA%8B%E6%9C%AC%E6%89%93%E5%BC%80"><span class="toc-number">2.</span> <span class="toc-text">2.右键用记事本打开</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#3-%E5%8F%B3%E9%94%AE%E6%89%93%E5%BC%80%E5%91%BD%E4%BB%A4%E8%A1%8C"><span class="toc-number">3.</span> <span class="toc-text">3.右键打开命令行</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#4-%E5%8F%B3%E9%94%AE%E5%A4%8D%E5%88%B6%E6%96%87%E4%BB%B6%E8%B7%AF%E5%BE%84"><span class="toc-number">4.</span> <span class="toc-text">4.右键复制文件路径</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#5-Windows%E7%85%A7%E7%89%87%E6%9F%A5%E7%9C%8B%E5%99%A8"><span class="toc-number">5.</span> <span class="toc-text">5.Windows照片查看器</span></a></li></ol>
    </nav>
  </div>
</aside>

<main class="main" role="main">
  <div class="content">
  <article id="post-make-your-windows-productive" class="article article-type-post" itemscope itemtype="http://schema.org/BlogPosting">
    
    <div class="article-header">
      
        
  
    <h1 class="article-title" itemprop="name">
      让你的Windows更具生产力
    </h1>
  

      
      <div class="article-meta">
        <span class="article-date">
    <i class="icon icon-calendar"></i>
	<a href="/20210904/make-your-windows-productive.html" class="article-date">
	  发布于 <time datetime="2021-09-04T15:45:56.000Z" itemprop="datePublished">2021-09-04</time>
	</a>
</span>
<span class="article-date">
    <i class="icon icon-calendar-check"></i>
	<a href="/20210904/make-your-windows-productive.html" class="article-date">
	  更新于 <time datetime="2021-09-06T15:26:09.000Z" itemprop="dateUpdated">2021-09-06</time>
	</a>
</span>
        
  <span class="article-category">
    <i class="icon icon-folder"></i>
    <a class="article-category-link" href="/categories/miscellanea/">miscellanea</a>
  </span>

        
  <span class="article-tag">
    <i class="icon icon-tags"></i>
	<a class="article-tag-link-link" href="/tags/miscellanea/" rel="tag">miscellanea</a>
  </span>


        

	<span class="article-read hidden-xs">
    	<i class="icon icon-eye-fill" aria-hidden="true"></i>
    	<span id="/20210904/make-your-windows-productive.html" class="leancloud_visitors"  data-flag-title="让你的Windows更具生产力">
			<span class="leancloud-visitors-count">0</span>
		</span>
    </span>

        <span class="post-comment"><i class="icon icon-comment"></i> <a href="/20210904/make-your-windows-productive.html#comments" class="article-comment-link">评论</a></span>
        
	
		<span class="post-wordcount hidden-xs" itemprop="wordCount">字数统计: 2.3k(字)</span>
	
	
		<span class="post-readcount hidden-xs" itemprop="timeRequired">阅读时长: 8(分)</span>
	

      </div>
      <div style="background-color:#D7BDE2;border:1px solid #D7BDE2;border-radius:10px;padding:5px">
          <b>温馨提示</b>：点击页面下方<i style="color:red" class="icon icon-anchor"></i>以展开或折叠目录
      </div>
    </div>
    <div class="article-entry marked-body" itemprop="articleBody">
      
        <p>摘要：通过修改注册表的方式提升Windows使用体验、提高工作效率！<span id="more"></span></p>
<blockquote>
<p><font size=5><b>文章说明</b></font><br><strong>文章作者：</strong><a href="https://hwame.top">鴻塵</a><br><strong>文章链接：</strong><a href="https://hwame.top/20210904/make-your-windows-productive.html">https://hwame.top/20210904/make-your-windows-productive.html</a><br><strong>参考资料：</strong></p>
<ul>
<li><a target="_blank" rel="noopener" href="https://my.oschina.net/u/2304110/blog/419536">实例讲解映像劫持的使用技巧——通过映像劫持实现Notepad2替换记事本</a></li>
<li><a target="_blank" rel="noopener" href="https://blog.csdn.net/qq_43227967/article/details/83280380">win10右键菜单添加「用记事本打开文件」</a></li>
<li><a target="_blank" rel="noopener" href="https://blog.csdn.net/cxrsdn/article/details/84538767">Win10添加右键打开cmd和Powershell窗口</a></li>
<li><a target="_blank" rel="noopener" href="https://windows10.pro/added-to-the-right-click-menu-copy-path-option/">在Win10右键菜单中添加「复制路径」选项</a></li>
<li><a target="_blank" rel="noopener" href="https://www.codepeople.cn/2019/01/13/Windows10-PhotoViewer-back/">Windows照片查看器-召回大法</a></li>
</ul>
</blockquote>
<h2 id="1-替换系统记事本"><a href="#1-替换系统记事本" class="headerlink" title="1.替换系统记事本"></a>1.替换系统记事本</h2><p>众所周知，Windows自带的记事本notepad及其简陋，有时候只想查看一下文件内容但又不想打开IDE，这时候一个简单的带语法高亮的记事本就派上用场了。</p>
<p>通过 <strong>映像劫持</strong> 实现将Notepad2替换系统自带的记事本。</p>
<p><strong>说明①：</strong> Notepad2网上有很多版本，本人自用的【<a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/f7GtgcnLu2L">Notepad2</a>】是仅有1.86M的单文件绿色版，所有配置 <strong>写死</strong> 到文件中，因此没有配置文件、没有主题文件、无法修改配置。<br><strong>说明②：</strong> Notepad2有些新的版本自带了「系统集成」的功能，可以一键替换，但我没有找到无需配置文件的单文件版，因此手动修改注册表。<br><strong>说明③：</strong> Notepad3支持的语法高亮更多，比如Markdown格式，奈何花里胡哨不在我的审美上。</p>
<blockquote>
<p><strong>参考文章：</strong> <a target="_blank" rel="noopener" href="https://my.oschina.net/u/2304110/blog/419536">https://my.oschina.net/u/2304110/blog/419536</a></p>
<p>所谓「映像劫持」，就是Image File Execution Options，是<code>CreateProcess</code>函数中的一个功能，即在可执行程序运行时，Windows会先检测对应IFEO中的<code>Debugger</code>值，如果存在这个参数的话，就运行这个参数中指定的程序。</p>
<p>其实现原理为，修改Image File Execution Options键值后，在有notepad.exe运行请求的时候，就欺骗系统转而运行notepad2.exe，从而实现将原本系统默认的记事本改成了功能更为全面的Notepad2。</p>
<p>这种方式不但不需要修改文件关联，也无需修改系统文件，避免了以往的文件替换法导致的系统更新后就失效的问题。</p>
</blockquote>
<p>具体步骤如下：</p>
<ul>
<li>下载Notepad2.exe单文件，【<a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/f7GtgcnLu2L">阿里云盘</a>】，【<a target="_blank" rel="noopener" href="https://github.com/hwame/pics/blob/main/download/Notepad2.exe">Github下载</a>】，版权信息如下：<br><img src="https://cdn.jsdelivr.net/gh/hwame/pics@main/miscellanea/20210905Notepad2.png" alt="Notepad2版权"></li>
<li>将其放在与原notepad.exe相同的位置，即<code>C:\Windows\System32\Notepad2.exe</code>。尽管这一步非必须，但仍建议这么做。</li>
<li><code>Win+R</code>运行输入<code>regedit</code>打开注册表，创建如下注册表项：<code>计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe</code>，如果无法修改，需要先右键取得权限。</li>
<li>在<code>notepad.exe</code>注册表项中，右键创建名为<code>Debugger</code>的字符串值（<code>REG_SZ</code>），如图：<br><img src="https://cdn.jsdelivr.net/gh/hwame/pics@main/miscellanea/20210905编辑注册表项值.png" alt="编辑注册表项值"></li>
<li>将字符串值<code>Debugger</code>的数值数据修改为Notepad2.exe的完整路径，最后以 <code>/z</code> 参数结尾，即<code>&quot;C:\WINDOWS\system32\Notepad2.exe&quot; /z</code>，如图：<br><img src="https://cdn.jsdelivr.net/gh/hwame/pics@main/miscellanea/20210905修改数值数据.png" alt="修改字符串值的数值数据"></li>
<li>至此文本文件用记事本打开即可，还可右键增加「用记事本打开」及图标，见下文。</li>
</ul>
<h2 id="2-右键用记事本打开"><a href="#2-右键用记事本打开" class="headerlink" title="2.右键用记事本打开"></a>2.右键用记事本打开</h2><p>上面已经将记事本替换成强大的Notepad2，但是一般情况下只有<code>txt</code>等文本文件才可直接用记事本打开。虽然可以右键选择打开方式，但未免太麻烦；那如果勾选「始终使用此应用打开xxx文件」，又会改变默认的打开方式，不符合我们的预期。例如<code>bat</code>文件双击运行，我们想用记事本打开查看内容就只能右键打开方式了。因此右键菜单增加「用记事本打开」也算是一个比较实用的提高生产力的功能了。</p>
<p>具体步骤如下：</p>
<ul>
<li><code>Win+R</code>运行输入<code>regedit</code>打开注册表，创建如下注册表项：<code>计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\notepad</code>，双击<code>默认</code>将数值数据修改为「用记事本打开」，如图：<br><img src="https://cdn.jsdelivr.net/gh/hwame/pics@main/miscellanea/20210905创建notepad项.png" alt="创建notepad项"></li>
<li>我们也可以为右键菜单添加一个记事本图标。如上图，在<code>notepad</code>项下新建一个名为<code>Icon</code>的 <strong>字符串值</strong> ，将其数值数据修改为Notepad2.exe的文件路径<code>C:\Windows\System32\notepad2.exe</code>。</li>
<li>在<code>notepad</code>项下新建一个名为<code>command</code>的 <strong>项</strong> （即子项），双击<code>默认</code>将数值数据修改为「<code>notepad %1</code>」，注意空格，如图：<br><img src="https://cdn.jsdelivr.net/gh/hwame/pics@main/miscellanea/20210905创建command子项.png" alt="创建command子项"></li>
</ul>
<h2 id="3-右键打开命令行"><a href="#3-右键打开命令行" class="headerlink" title="3.右键打开命令行"></a>3.右键打开命令行</h2><p>有时候我们需要在特定目录下打开命令行，通常会在开始菜单或运行中打开，此时路径一般为<code>C:\Users\鴻塵</code>或<code>C:\Windows\System32</code>，然后一层一层切换过去。</p>
<p>在右键菜单中添加「在此处打开命令行」，可以直接定位到当前文件夹，免去<code>cd</code>之苦。</p>
<p>本文打开命令行仅以普通用户权限，因为我的组策略已修改为「管理权限创建任务」，若有需要以管理员身份打开命令行，请移步参考文章。</p>
<p>具体步骤如下：</p>
<ul>
<li>右键打开CMD<ul>
<li><code>Win+R</code>运行输入<code>regedit</code>打开注册表，创建如下注册表项：<code>计算机\HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere</code>，将「默认」字符串值的数值数据为「在此处打开命令行窗口」。此处项值和数值数据可随意。</li>
<li>在<code>OpenCmdHere</code>项下新建一个名为<code>Icon</code>的 <strong>字符串值</strong> ，将其数值数据修改为cmd.exe的文件路径<code>cmd.exe</code>。</li>
<li>在<code>OpenCmdHere</code>项下新建一个名为<code>command</code>的 <strong>项</strong> （即子项），双击<code>默认</code>将数值数据修改为「<code>cmd.exe /s /k pushd &quot;%V&quot;</code>」。</li>
<li>此处步骤与上文<a href="#2-%E5%8F%B3%E9%94%AE%E7%94%A8%E8%AE%B0%E4%BA%8B%E6%9C%AC%E6%89%93%E5%BC%80">右键用记事本打开</a>类似，简要截图如下：<br><img src="https://cdn.jsdelivr.net/gh/hwame/pics@main/miscellanea/20210905右键打开CMD.png" alt="右键打开CMD"></li>
</ul>
</li>
<li>右键打开PowerShell<ul>
<li><code>Win+R</code>运行输入<code>regedit</code>打开注册表，创建如下注册表项：<code>计算机\HKEY_CLASSES_ROOT\Directory\Background\shell\Powershell_Here</code>，「默认」字符串值的数值数据为「在此处打开PowerShell」。此处项值和数值数据可随意。</li>
<li>在<code>Powershell_Here</code>项下新建一个名为<code>Icon</code>的 <strong>字符串值</strong> ，将其数值数据修改为powershell.exe的文件路径<code>powershell.exe</code>。</li>
<li>在<code>Powershell_Here</code>项下新建一个名为<code>command</code>的 <strong>项</strong> （即子项），双击<code>默认</code>将数值数据修改为「<code>powershell.exe -noexit -command Set-Location &#39;%V&#39;</code>」。</li>
<li>截图略。</li>
</ul>
</li>
</ul>
<p><strong>说明：</strong> 增加图标时没有写文件的完整路径，因为路径已在环境变量中，故上文<a href="#2-%E5%8F%B3%E9%94%AE%E7%94%A8%E8%AE%B0%E4%BA%8B%E6%9C%AC%E6%89%93%E5%BC%80">右键用记事本打开</a>中设置图标同理可简写。</p>
<h2 id="4-右键复制文件路径"><a href="#4-右键复制文件路径" class="headerlink" title="4.右键复制文件路径"></a>4.右键复制文件路径</h2><p>当我们需要用到某文件的绝对路径时，怎么获取该字符串呢？是先地址栏复制目录再复制文件名，还是文件属性的安全里面去复制对象名称？</p>
<p>因此在右键菜单添加一个复制文件（夹）路径，也能提高生产力。</p>
<p>但是我不会告诉你，选中文件（夹）后按住<code>Shift</code>右键就有「复制为路径」的选项！所以这里修改注册表其实也是多此一举，但是有多少人知道这种「复制为路径」的方法呢？</p>
<p>方法1.0来自<a target="_blank" rel="noopener" href="https://www.52pojie.cn/">吾爱破解</a>论坛用户<a target="_blank" rel="noopener" href="https://www.52pojie.cn/home.php?mod=space&amp;uid=896814">tmdgdx</a>的评论，详见<a target="_blank" rel="noopener" href="https://www.52pojie.cn/forum.php?mod=viewthread&amp;tid=1374242&amp;page=1#pid36998334">https://www.52pojie.cn/forum.php?mod=viewthread&amp;tid=1374242&amp;page=1#pid36998334</a>。<br><figure class="highlight nsis"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">Windows Registry Editor Version <span class="number">5.00</span></span><br><span class="line"></span><br><span class="line">[<span class="params">HKEY_CLASSES_ROOT</span>\<span class="literal">Directory</span>\shell\copypath]</span><br><span class="line">@=<span class="string">&quot;复制文件夹路径&quot;</span></span><br><span class="line">[<span class="params">HKEY_CLASSES_ROOT</span>\<span class="literal">Directory</span>\shell\copypath\command]</span><br><span class="line">@=<span class="string">&quot;mshta vbscript:clipboarddata.setdata(\&quot;</span>text\<span class="string">&quot;,\&quot;</span>%<span class="number">1</span>\<span class="string">&quot;)(close)&quot;</span></span><br><span class="line"></span><br><span class="line">[<span class="params">HKEY_CLASSES_ROOT</span>\*\shell\copypath]</span><br><span class="line">@=<span class="string">&quot;复制文件路径&quot;</span></span><br><span class="line">[<span class="params">HKEY_CLASSES_ROOT</span>\*\shell\copypath\command]</span><br><span class="line">@=<span class="string">&quot;mshta vbscript:clipboarddata.setdata(\&quot;</span>text\<span class="string">&quot;,\&quot;</span>%<span class="number">1</span>\<span class="string">&quot;)(close)&quot;</span></span><br></pre></td></tr></table></figure></p>
<p>上述mshta这种方法有两个问题：</p>
<ul>
<li>①复制exe等格式的文件时会有类似「是否运行xxx」的警告；</li>
<li>②复制链接例如快捷方式会复制源文件路径，而不是快捷方式本身的路径。</li>
</ul>
<p>推荐使用<a target="_blank" rel="noopener" href="https://windows10.pro/added-to-the-right-click-menu-copy-path-option/">在Win10右键菜单中添加「复制路径」选项</a>中的方法2.0：</p>
<figure class="highlight nginx"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="attribute">Windows</span> Registry Editor Version <span class="number">5</span>.<span class="number">00</span></span><br><span class="line">[HKEY_CLASSES_ROOT\Allfilesystemobjects\shell\windows.copyaspath]</span><br><span class="line"><span class="string">&quot;CanonicalName&quot;</span>=<span class="string">&quot;&#123;707C7BC6-685A-4A4D-A275-3966A5A3EFAA&#125;&quot;</span></span><br><span class="line"><span class="string">&quot;CommandStateHandler&quot;</span>=<span class="string">&quot;&#123;3B1599F9-E00A-4BBF-AD3E-B3F99FA87779&#125;&quot;</span></span><br><span class="line"><span class="string">&quot;CommandStateSync&quot;</span>=<span class="string">&quot;&quot;</span></span><br><span class="line"><span class="string">&quot;Description&quot;</span>=<span class="string">&quot;<span class="variable">@shell32</span>.dll,-30336&quot;</span></span><br><span class="line"><span class="string">&quot;Icon&quot;</span>=<span class="string">&quot;imageres.dll,-5302&quot;</span></span><br><span class="line"><span class="string">&quot;InvokeCommandOnSelection&quot;</span>=dword:<span class="number">00000001</span></span><br><span class="line"><span class="string">&quot;MUIVerb&quot;</span>=<span class="string">&quot;<span class="variable">@shell32</span>.dll,-30329&quot;</span></span><br><span class="line"><span class="string">&quot;VerbHandler&quot;</span>=<span class="string">&quot;&#123;f3d06e7c-1e45-4a26-847e-f9fcdee59be0&#125;&quot;</span></span><br><span class="line"><span class="string">&quot;VerbName&quot;</span>=<span class="string">&quot;copyaspath&quot;</span></span><br></pre></td></tr></table></figure>
<p>其中<code>&quot;Icon&quot;=&quot;imageres.dll,-5302&quot;</code>可以改成<code>4</code>，换成文件夹风格图标，如图所示：<br><img src="https://cdn.jsdelivr.net/gh/hwame/pics@main/miscellanea/20210906右键复制路径.png" alt="右键复制路径"></p>
<h2 id="5-Windows照片查看器"><a href="#5-Windows照片查看器" class="headerlink" title="5.Windows照片查看器"></a>5.Windows照片查看器</h2><p>众所周知，Win10自带的「照片」极其难用，甚至可能需要安装第三方替代软件，这让我们不得不感叹还是Win7时代的「Windows照片查看器」最经典。</p>
<p>通过修改注册表的方式恢复「Windows照片查看器」，并且设置为默认。</p>
<p>具体步骤如下：</p>
<ul>
<li><code>Win+R</code>运行输入<code>regedit</code>打开注册表，定位到如下注册表项：<code>计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations</code>。</li>
<li>在<code>FileAssociations</code>项下新建一个名为<code>.jpg</code>的 <strong>字符串值</strong> ，将其数值数据修改为<code>PhotoViewer.FileAssoc.Tiff</code>。</li>
<li>同样新建其他图片后缀名的字符串值，例如<code>.jpeg</code>、<code>.png</code>、<code>.gif</code>、<code>.bmp</code>、<code>.ico</code>等，数值数据皆为<code>PhotoViewer.FileAssoc.Tiff</code>，添加完成后的注册表如图所示：<br><img src="https://cdn.jsdelivr.net/gh/hwame/pics@main/miscellanea/20210906修改图片文件关联.png" alt="修改图片文件关联"></li>
<li>双击图片打开时选择「Windows照片查看器」并勾选「始终使用此应用打开.xxx文件」即可设置为默认方式。若已设置其他为默认，右键打开方式选择其他应用，即可设置默认。如图所示：<br><img src="https://cdn.jsdelivr.net/gh/hwame/pics@main/miscellanea/20210906选择图片默认打开方式.png" alt="选择图片默认打开方式"></li>
</ul>
<p><strong>注意①：</strong> 并非所有格式的图片都能用「Windows照片查看器」打开，如<code>.webp</code>、<code>.svg</code>等。<br><strong>注意②：</strong> 新建的 <strong>字符串值</strong> 名称为图片扩展名，且有一个点<code>.</code>。</p>

      
    </div>
    <div class="article-footer">
      <blockquote class="mt-2x">
  <ul class="post-copyright list-unstyled">
    <li class="post-copyright-license">
      <strong>文章作者： </strong><a href="https://hwame.top" style="color:#E541E5;"> 鴻塵</a>
    </li>
    
    <li class="post-copyright-link hidden-xs">
      <strong>本文链接：</strong>
      <a href="https://hwame.top/20210904/make-your-windows-productive.html" title="让你的Windows更具生产力" target="_blank" rel="external" style="color:#E541E5;">https://hwame.top/20210904/make-your-windows-productive.html</a>
    </li>
    
    <li class="post-copyright-license">
      <strong>版权声明： </strong> 本博客所有文章除特别声明外，均采用《<a href="http://creativecommons.org/licenses/by/4.0/deed.zh" target="_blank" rel="external" style="color:#E541E5;"><u>CC BY 4.0 CN协议</u></a>》许可协议。转载请注明出处！
    </li>
  </ul>
</blockquote>


<div class="panel panel-default panel-badger">
  <div class="panel-body">
    <figure class="media">
      <div class="media-left">
        <a href="https://hwame.top" target="_blank" class="img-burn thumb-sm visible-lg">
          <img src="https://cdn.jsdelivr.net/gh/hwame/pics@main/avatar.jpg" class="img-rounded w-full" alt="">
        </a>
      </div>
      <div class="media-body">
        <h3 class="media-heading"><a href="https://hwame.top" target="_blank"><span class="text-dark">鴻塵</span><small class="ml-1x">Pythoner, Data Analyst</small></a></h3>
        <div>个人简介：处女座不适合做码农。</div>
      </div>
    </figure>
  </div>
</div>


    </div>
  </article>
  
    
  <section id="comments">
  	
      <div id="vcomments"></div>
    
  </section>


  
</div>

  <nav class="bar bar-footer clearfix" data-stick-bottom>
  <div class="bar-inner">
  
  <ul class="pager pull-left">
    
    <li class="prev">
      <a href="/20211009/install-linux-on-android-phone.html" title="如何在安卓手机上安装Linux发行版"><i class="icon icon-angle-left" aria-hidden="true"></i><span>&nbsp;&nbsp;上一篇</span></a>
    </li>
    
    
    <li class="next">
      <a href="/20210814/mongodb-aggregation-examples.html" title="MongoDB聚合示例"><span>下一篇&nbsp;&nbsp;</span><i class="icon icon-angle-right" aria-hidden="true"></i></a>
    </li>
    
    
    <li class="toggle-toc">
      <a class="toggle-btn collapsed" data-toggle="collapse" href="#collapseToc" aria-expanded="false" title="文章目录" role="button">
        <span style="color:#C71585">[&nbsp;</span><span style="color:#C71585">文章目录</span>
        <i class="text-collapsed icon icon-anchor"></i>
        <i class="text-in icon icon-close"></i>
        <span style="color:#C71585">]</span>
      </a>
    </li>
    
  </ul>
  
  
  
  <div class="bar-right">
    
    <div class="share-component" data-sites="weibo,qq,wechat,facebook,twitter" data-mobile-sites="weibo,wechat,qq,qzone"></div>
    
  </div>
  </div>
</nav>
  


</main>

  <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<footer class="footer" itemscope itemtype="http://schema.org/WPFooter">
	
	
    <ul class="social-links">
    	
        <li><a href="https://github.com/hwame" target="_blank" title="Github" data-toggle=tooltip data-placement=top><i class="icon icon-github"></i></a></li>
        
        <li><a href="https://weibo.com/hwamei" target="_blank" title="Weibo" data-toggle=tooltip data-placement=top><i class="icon icon-weibo"></i></a></li>
        
        <li><a href="https://www.zhihu.com/people/hwame" target="_blank" title="Zhihu" data-toggle=tooltip data-placement=top><i class="icon icon-zhihu"></i></a></li>
        
        <li><a href="https://segmentfault.com/u/hwame" target="_blank" title="Segmentfault" data-toggle=tooltip data-placement=top><i class="icon icon-segmentfault"></i></a></li>
        
        <li><a href="https://gitee.com/hwame" target="_blank" title="Gitee" data-toggle=tooltip data-placement=top><i class="icon icon-gitee"></i></a></li>
        
        <li><a href="/atom.xml" target="_blank" title="Rss" data-toggle=tooltip data-placement=top><i class="icon icon-rss"></i></a></li>
        
    </ul>

    <div class="copyright">
    	
        &copy; 2025 鴻塵
        
        
        <div class="publishby" style="font-family:Courier">
            <span id="busuanzi_container_site_pv">
                <i class="icon icon-eye"></i><span id="busuanzi_value_site_pv" style="font-family:Courier"></span>&nbsp;
                <i class="icon icon-users"></i><span id="busuanzi_value_site_uv" style="font-family:Courier"></span>
            </span>
            <!--
            <br>✯<a target="_blank" rel="noopener" href="https://beian.miit.gov.cn/" style="color:#0FFFAA">鄂ICP备2020019329号</a>
            -->
            <br><i class="icon icon-clock" style="transform:rotate(90deg)"></i><span id="sitetime" style="font-family:Courier"></span>
        </div>
        
        <!--
        <div class="publishby">
        	Theme by <a href="https://github.com/cofess" target="_blank"> cofess </a>base on <a href="https://github.com/cofess/hexo-theme-pure" target="_blank">pure</a>.
        </div>
        -->
    </div>
    
</footer>
<script>
    function siteTime(){
        window.setTimeout("siteTime()", 1000);
        var seconds = 1000;
        var minutes = seconds * 60;
        var hours = minutes * 60;
        var days = hours * 24;
        var years = days * 365;
        var today = new Date();
        var todayYear = today.getFullYear();
        var todayMonth = today.getMonth()+1;
        var todayDate = today.getDate();
        var todayHour = today.getHours();
        var todayMinute = today.getMinutes();
        var todaySecond = today.getSeconds();
        /* Date.UTC() -- 返回date对象距世界标准时间(UTC)1970年1月1日午夜之间的毫秒数(时间戳)
        year - 作为date对象的年份，为4位年份值
        month - 0-11之间的整数，做为date对象的月份
        day - 1-31之间的整数，做为date对象的天数
        hours - 0(午夜24点)-23之间的整数，做为date对象的小时数
        minutes - 0-59之间的整数，做为date对象的分钟数
        seconds - 0-59之间的整数，做为date对象的秒数
        microseconds - 0-999之间的整数，做为date对象的毫秒数 */
        var t1 = Date.UTC(2020,05,19,21,20,52); //建站时间
        var t2 = Date.UTC(todayYear,todayMonth,todayDate,todayHour,todayMinute,todaySecond);
        var diff = t2-t1;
        var diffYears = Math.floor(diff/years);
        var diffDays = Math.floor((diff/days)-diffYears*365);
        var diffHours = Math.floor((diff-(diffYears*365+diffDays)*days)/hours);
        var diffMinutes = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours)/minutes);
        var diffSeconds = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours-diffMinutes*minutes)/seconds);
        // 将「数字」转「补零字符串」
        var y = diffYears.toString()
        var d = diffDays.toString().padStart(3, '0')
        var h = diffHours.toString().padStart(2, '0')
        var m = diffMinutes.toString().padStart(2, '0')
        var s = diffSeconds.toString().padStart(2, '0')
        document.getElementById("sitetime").innerHTML=y+":"+d+":"+h+":"+m+":"+s;
    }
    siteTime();
</script>
  <script src="//cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
<script>
window.jQuery || document.write('<script src="js/jquery.min.js"><\/script>')
</script>
<div id="go-top"></div>
<style type="text/css">
#go-top {
 width:40px;height:40px;
 background-color:#DDA0DD;
 position:relative;
 border-radius:20px;
 position:fixed;right:20px;bottom:50px;
 cursor:pointer;display:none;
}
#go-top:after {
 content:" ";
 position:absolute;left:14px;top:14px;
 border-top:2px solid #fff;border-right:2px solid #fff;
 width:12px;height:12px;
 transform:rotate(-45deg);
}
#go-top:hover {
 background-color:#8A2BE2;
}
</style>
<script>
$(function () {
  var top=$("#go-top");
  $(window).scroll(function () {
    ($(window).scrollTop() > 300) ? top.show(300) : top.hide(200);
    $("#go-top").click(function () {
      $('body,html').animate({scrollTop:0});
      return false();
    })
  });
});
</script>

<script src="/js/plugin.min.js"></script>


<script src="/js/application.js"></script>


    <script>
(function (window) {
    var INSIGHT_CONFIG = {
        TRANSLATION: {
            POSTS: '文章',
            PAGES: '页面',
            CATEGORIES: '分类',
            TAGS: '标签',
            UNTITLED: '(未命名)',
        },
        ROOT_URL: '/',
        CONTENT_URL: '/content.json',
    };
    window.INSIGHT_CONFIG = INSIGHT_CONFIG;
})(window);
</script>

<script src="/js/insight.js"></script>





   




   
    

  <script src='/waline.js'></script>
  <link rel="stylesheet" type="text/css" href="/waline.css" />
  
  <script type="text/javascript">
 
  
Waline.init({
      el: '#vcomments',
      serverURL: 'https://waline.hwame.top',
});
  </script>

     


<!-- 20201211添加判断 -->

   
  <script src="//cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js"></script>
  <script>
  //利用 FancyBox 实现点击图片放大
  $(document).ready(function() {
    $('article img').not('[hidden]').not('.panel-body img').each(function() {
      var $image = $(this);
      var imageCaption = $image.attr('alt');
      var $imageWrapLink = $image.parent('a');
      if ($imageWrapLink.length < 1) {
        var src = this.getAttribute('src');
        var idx = src.lastIndexOf('?');
        if (idx != -1) {
          src = src.substring(0, idx);
        }
        $imageWrapLink = $image.wrap('<a href="' + src + '"></a>').parent('a');
      }
      $imageWrapLink.attr('data-fancybox', 'images');
      if (imageCaption) {
        $imageWrapLink.attr('data-caption', imageCaption);
      }
    });
    $().fancybox({
      selector: '[data-fancybox="images"]',
      hash: false,
      loop: true,
    });
  });
  </script>







  
  <style>
    .copy-btn {
      display: inline-block;
      padding: 6px 12px;
      font-size: 13px;
      font-weight: 700;
      line-height: 20px;
      color: #333;
      white-space: nowrap;
      vertical-align: middle;
      cursor: pointer;
      background-color: #eee;
      background-image: linear-gradient(#fcfcfc, #eee);
      border: 1px solid #d5d5d5;
      border-radius: 3px;
      user-select: none;
      outline: 0;
    }

    .highlight-wrap .copy-btn {
      transition: opacity .3s ease-in-out;
      opacity: 0;
      padding: 2px 6px;
      position: absolute;
      right: 4px;
      top: 8px;
      z-index: 2;
    }

    .highlight-wrap:hover .copy-btn,
        .highlight-wrap .copy-btn:focus {
      opacity: 1
    }

    .highlight-wrap {
      position: relative;
    }
  </style>
  
  <script>
    addLoadEvent(()=>{
      $('.highlight').each(function (i, e) {
        var $wrap = $('<div>').addClass('highlight-wrap')
        $(e).after($wrap)
        $wrap.append($('<button>').addClass('copy-btn').append('一键复制').on('click', function (e) {
          var code = $(this).parent().find(".code")[0].innerText
          
          var ta = document.createElement('textarea')
          document.body.appendChild(ta)
          ta.style.position = 'absolute'
          ta.style.top = '0px'
          ta.style.left = '0px'
          ta.value = code
          ta.select()
          ta.focus()
          var result = document.execCommand('copy')
          document.body.removeChild(ta)
          
            if(result)$(this).text('复制成功')
            else $(this).text('复制失败')
          
          $(this).blur()
        })).on('mouseleave', function (e) {
          var $b = $(this).find('.copy-btn')
          setTimeout(function () {
            $b.text('一键复制')
          }, 300)
        }).append(e)
      })
    })
  </script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
        tex2jax: {
            inlineMath: [ ["$","$"], ["\\(","\\)"] ],
            skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code'],
            processEscapes: true
        }
    });
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax();
        for (var i = 0; i < all.length; ++i)
            all[i].SourceElement().parentNode.className += ' has-jax';
    });
</script>
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
</body>
</html>